package com.sso.service.impl;

import java.util.List;

import com.sso.dao.IDicSystemDao;
import com.sso.entity.DicSystem;
import com.sso.service.IDicSystemService;

public class DicSystemServiceImpl implements IDicSystemService{
	private IDicSystemDao dicSystemDao;

	public IDicSystemDao getDicSystemDao() {
		return dicSystemDao;
	}

	public void setDicSystemDao(IDicSystemDao dicSystemDao) {
		this.dicSystemDao = dicSystemDao;
	}

	@Override
	public void deleteDicSystem(DicSystem system) {
		dicSystemDao.delete(system);
	}

	@Override
	public List<DicSystem> getAllSystem() {
		return dicSystemDao.getAll();
	}

	@Override
	public List<DicSystem> getBySystem(String systemName) {
		return dicSystemDao.findAllByNamedQuery("system.getBySystem", systemName);
	}

	@Override
	public DicSystem getBySystemID(String systemID) {
		return dicSystemDao.getById(systemID);
	}

	@Override
	public void saveDicSystem(DicSystem system) {
		dicSystemDao.saveOrUpdate(system);
	}
	
	
}
